package com.yuantu.judiciary.model.vo;

import com.yuantu.judiciary.model.dto.EntFiliationDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

/**
 * 企业分支机构
 *
 * @author syw
 * @since 2023-07-20
 **/
@Data
@ApiModel("企业分支机构")
@Builder
public class EntFiliationVO {
    @ApiModelProperty("分支机构名称") private String brname;
    @ApiModelProperty("分支机构企业注册号") private String brregno;
    @ApiModelProperty("分支机构统一社会信用代码") private String brn_credit_code;
    @ApiModelProperty("分支机构登记机关") private String brn_reg_org;

    public static EntFiliationVO getEntFiliation(EntFiliationDTO data) {
        return EntFiliationVO.builder()
                .brname(data.getBRNAME())
                .brregno(data.getBRREGNO())
                .brn_credit_code(data.getBRN_CREDIT_CODE())
                .brn_reg_org(data.getBRN_REG_ORG())
                .build();
    }

}
